CC=gcc
MKDIR=mkdir -p

OPTS=-O2
CFLAGS=
LDFLAGS=

BUILD=./build

SRCS = \
	src/cal.c \
	src/mbsalign.c \
	src/langinfo.c \
	
_default: all

OBJS =  $(addprefix ${BUILD}/, $(SRCS:.c=.o))

${BUILD}/%.o: %.c 	
	@$(MKDIR) ${BUILD}/src   
	$(CC) $(OPTS) $(CFLAGS) -c -o$@ $<
		


$(BUILD)/cal.exe: $(OBJS)
	$(CC) $(OPTS) $(CFLAGS) -o$@ $^  $(LDFLAGS) 


all: $(BUILD)/cal.exe


